package com.baizhi.appController;

import com.baizhi.entity.Album;
import com.baizhi.service.AlbumService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
@RequestMapping("album")
@RestController
public class AppAlbumcontroller {
    @Autowired
    private AlbumService albumService;

    @GetMapping("selectAlbumByDate/{count}")
    public List<Album> selectAlbumByDate(@PathVariable("count") Integer count){
        return albumService.selectAlbumByDate(count);
    }
}
